import { COMPONENT_TYPE } from '../../constants'

/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-02-19 00:35
 * @version 2.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 */
export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'activeKey',
      rules: [],
      label: '激活面板',
      extra: '当前激活 tab 面板的 key',
    },
    attrs: {
      value: '',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入key'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'bordered',
      rules: [],
      label: '是否边框',
      extra: '',
    },
    attrs: {
      checked: true
    }
  },
  {
    id: '3',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'accordion',
      rules: [],
      label: '手风琴模式',
      extra: '',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '4',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'destroyInactivePanel',
      rules: [],
      label: '销毁面板',
      extra: '销毁折叠隐藏的面板',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '5',
    type: COMPONENT_TYPE.INPUT_BUTTON,
    formItem: {
      prop: 'children',
      rules: [],
      label: '面板名称',
      extra: '',
    },
    attrs: {
      grid: 'row',
      value: [{ code: 'test', name: '测试' }],
      count: 2,
      keys: 'code,name',
      placeholders: '请输入编码,请输入名称',
      type: 'text',
      allowClear: true
    }
  },
  {
    id: '6',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'layoutName',
      rules: [],
      label: '组件名称',
      extra: '在使用插槽时方，用于标识当前组件',
    },
    attrs: {
      value: Date.now() + '',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入组件名称'
    }
  }
]
